<?php
	Class Md_donhang extends CI_Model{
		function insert_donhang($data){
			$data['ngay_dat'] =date("Y/m/d H:i:s");
			$data['ngay_thaydoi'] =date("Y/m/d H:i:s");			
			$this->db->insert('donhang',$data);
			return $this->db->insert_id();
		}
		function insert_donhang_chitiet($data){
			foreach ($data as $row){
				$this->db->insert('donhang_chitiet',$row);
			}
			
		}
	}
?>